﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Functions/Forms/Forms.master" AutoEventWireup="true" CodeBehind="AdminMainView.aspx.cs" Inherits="HRDexCapstoneProject.Functions.Forms.WebForm8" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainPage" runat="server">
    <div>
        <asp:Panel ID="pCBA" runat="server">
        CBA FORM<asp:GridView ID="gvCBA" runat="server" AutoGenerateColumns="False" 
            DataSourceID="cba" DataKeyNames="formCBAID">
                <Columns>
                    <asp:BoundField DataField="formCBAID" HeaderText="formCBAID" 
                    SortExpression="formCBAID" InsertVisible="False" ReadOnly="True" />
                    <asp:BoundField DataField="Name" HeaderText="Name" 
                    SortExpression="Name" ReadOnly="True" />
                    <asp:BoundField DataField="DateSubmitted" HeaderText="DateSubmitted" 
                    SortExpression="DateSubmitted" />
                    <asp:BoundField DataField="ApprovalID" HeaderText="ApprovalID" 
                    SortExpression="ApprovalID" />
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:HyperLink ID="lnkSelect" runat='server' NavigateUrl='<%# String.Format("~/Functions/Forms/CBAform.aspx?formCBAID={0}", Eval("formCBAID")) %>'>Select</asp:HyperLink>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
            <asp:SqlDataSource ID="cba" runat="server" 
            ConnectionString="<%$ ConnectionStrings:HRmainConnectionString %>" 
            
            
            
            
            
            SelectCommand="SELECT formCBA.formCBAID, formEmployees.LastName + ', ' + formEmployees.FirstName + ' ' + formEmployees.MiddleName AS Name, formCBA.DateSubmitted, formCBA.ApprovalID FROM formCBA INNER JOIN formEmployees ON formCBA.EmployeeID = formEmployees.EmployeeID WHERE (formEmployees.EmployeeID = @EmployeeID)">
                <SelectParameters>
                    <asp:SessionParameter Name="EmployeeID" SessionField="EmployeeID" 
                    Type="Int32" />
                </SelectParameters>
            </asp:SqlDataSource>
        </asp:Panel>
        <asp:Panel ID="pFlexi" runat="server">
        FLEXI FORM<br />
            <asp:GridView ID="GridView3" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="FlexiID" DataSourceID="Flexi">
                <Columns>
                    <asp:BoundField DataField="FlexiID" HeaderText="FlexiID" InsertVisible="False" 
                    ReadOnly="True" SortExpression="FlexiID" />
                    <asp:BoundField DataField="ApprovalHeadID" HeaderText="ApprovalHeadID" 
                    SortExpression="ApprovalHeadID" />
                    <asp:BoundField DataField="ApprovalDeanID" HeaderText="ApprovalDeanID" 
                    SortExpression="ApprovalDeanID" />
                    <asp:BoundField DataField="ApprovalHRID" HeaderText="ApprovalHRID" 
                    SortExpression="ApprovalHRID" />
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:HyperLink ID="lnkSelect0" runat='server' 
                                NavigateUrl='<%# String.Format("~/Functions/Forms/FlexiForm.aspx?FlexiID={0}", Eval("FlexiID")) %>'>Select</asp:HyperLink>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
            <asp:SqlDataSource ID="Flexi" runat="server" 
            ConnectionString="<%$ ConnectionStrings:HRmainConnectionString %>" 
            SelectCommand="SELECT [FlexiID], [ApprovalHeadID], [ApprovalDeanID], [ApprovalHRID] FROM [formFlexi]">
            </asp:SqlDataSource>
        </asp:Panel>
        <asp:Panel ID="pNoA" runat="server">
        Notice of Absence FORM<br />
            <asp:GridView ID="GridView4" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="NoticeOfAbsenceID" DataSourceID="NoticeOfAbsence">
                <Columns>
                    <asp:BoundField DataField="NoticeOfAbsenceID" HeaderText="NoticeOfAbsenceID" 
                    InsertVisible="False" ReadOnly="True" SortExpression="NoticeOfAbsenceID" />
                    <asp:BoundField DataField="Name" HeaderText="Name" 
                    SortExpression="Name" ReadOnly="True" />
                    <asp:BoundField DataField="pubDate" HeaderText="pubDate" 
                    SortExpression="pubDate" />
                    <asp:BoundField DataField="ApprovalName" HeaderText="ApprovalName" 
                    SortExpression="ApprovalName" />
                </Columns>
            </asp:GridView>
            <asp:SqlDataSource ID="NoticeOfAbsence" runat="server" 
            ConnectionString="<%$ ConnectionStrings:HRmainConnectionString %>" 
            
            
            
                SelectCommand="SELECT formNoticeofAbsence.NoticeOfAbsenceID, formEmployees.LastName + ', ' + formEmployees.FirstName + ' ' + formEmployees.MiddleName AS Name, formNoticeofAbsence.pubDate, catApproval.ApprovalName FROM formNoticeofAbsence INNER JOIN formEmployees ON formNoticeofAbsence.ForEmpID = formEmployees.EmployeeID INNER JOIN catApproval ON formNoticeofAbsence.ApprovalFac = catApproval.ApprovalIDHR ">
            </asp:SqlDataSource>
        </asp:Panel>
        <asp:Panel ID="pSubsti" runat="server">
        SUBSTITUTIONFORM<br />
            <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="SubstitutionID" DataSourceID="Substi">
                <Columns>
                    <asp:BoundField DataField="SubstitutionID" HeaderText="SubstitutionID" 
                    InsertVisible="False" ReadOnly="True" SortExpression="SubstitutionID" />
                    <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" 
                    ReadOnly="True" />
                    <asp:BoundField DataField="FacultySubID" HeaderText="FacultySubID" 
                    SortExpression="FacultySubID" />
                    <asp:BoundField DataField="ApprovalHead" HeaderText="ApprovalHead" 
                    SortExpression="ApprovalHead" />
                    <asp:BoundField DataField="ApprovalDean" HeaderText="ApprovalDean" 
                    SortExpression="ApprovalDean" />
                    <asp:BoundField DataField="ApprovalHR" HeaderText="ApprovalHR" 
                    SortExpression="ApprovalHR" />
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:HyperLink ID="lnkSelect2" runat='server' 
                                NavigateUrl='<%# String.Format("~/Functions/Forms/SubstitutionForm.aspx?SubstitutionID={0}", Eval("SubstitutionID")) %>'>Select</asp:HyperLink>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
            <asp:SqlDataSource ID="Substi" runat="server" 
            ConnectionString="<%$ ConnectionStrings:HRmainConnectionString %>" 
            
            SelectCommand="SELECT formSubstitution.SubstitutionID, formEmployees.LastName + ', ' + formEmployees.FirstName + ' ' + formEmployees.MiddleName AS Name, formSubstitution.FacultySubID, formSubstitution.ApprovalHead, formSubstitution.ApprovalDean, formSubstitution.ApprovalHR FROM formSubstitution INNER JOIN formEmployees ON formSubstitution.EmpID = formEmployees.EmployeeID">
            </asp:SqlDataSource>
        </asp:Panel>
        <asp:Panel ID="pDownloadable" runat="server">
            <asp:Panel ID="Panel1" runat="server">
                LEAVE FORM<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                    DataKeyNames="LeaveID" DataSourceID="LeaveForm">
                    <Columns>
                        <asp:BoundField DataField="LeaveID" HeaderText="LeaveID" InsertVisible="False" 
                            ReadOnly="True" SortExpression="LeaveID" />
                        <asp:BoundField DataField="EmployeeID" HeaderText="EmployeeID" 
                            SortExpression="EmployeeID" />
                        <asp:BoundField DataField="PositionID" HeaderText="PositionID" 
                            SortExpression="PositionID" />
                        <asp:BoundField DataField="ApprovalIDHR" HeaderText="ApprovalIDHR" 
                            SortExpression="ApprovalIDHR" />
                        <asp:BoundField DataField="ApprovalIDHead" HeaderText="ApprovalIDHead" 
                            SortExpression="ApprovalIDHead" />
                        <asp:BoundField DataField="ApprovalIDDean" HeaderText="ApprovalIDDean" 
                            SortExpression="ApprovalIDDean" />
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:HyperLink ID="lnkSelect3" runat='server' 
                                    NavigateUrl='<%# String.Format("~/Functions/Forms/LeaveForm.aspx?LeaveID={0}", Eval("LeaveID")) %>'>Select</asp:HyperLink>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
                <asp:SqlDataSource ID="LeaveForm" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:HRmainConnectionString %>" 
                    
                    SelectCommand="SELECT [LeaveID], [EmployeeID], [PositionID], [ApprovalIDHR], [ApprovalIDHead], [ApprovalIDDean] FROM [formLeave]">
                </asp:SqlDataSource>
            </asp:Panel>
        </asp:Panel>
    </div>
</asp:Content>
